package com.ruoyi.equipment.mapper;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.equipment.domain.TEquipmentLog;
import org.apache.ibatis.annotations.Param;

/**
 * 设备日志Mapper接口
 * 
 * @author ruoyi
 * @date 2021-12-23
 */
public interface TEquipmentLogMapper 
{
    /**
     * 查询设备日志
     * 
     * @param userId 设备日志主键
     * @return 设备日志
     */
    public TEquipmentLog selectTEquipmentLogByUserId(Integer userId);

    /**
     * 查询设备日志列表
     * 
     * @param tEquipmentLog 设备日志
     * @return 设备日志集合
     */
    public List<TEquipmentLog> selectTEquipmentLogList(TEquipmentLog tEquipmentLog);

    /**
     * 新增设备日志
     * 
     * @param tEquipmentLog 设备日志
     * @return 结果
     */
    public int insertTEquipmentLog(TEquipmentLog tEquipmentLog);

    /**
     * 修改设备日志
     * 
     * @param tEquipmentLog 设备日志
     * @return 结果
     */
    public int updateTEquipmentLog(TEquipmentLog tEquipmentLog);

    /**
     * 删除设备日志
     * 
     * @param userId 设备日志主键
     * @return 结果
     */
    public int deleteTEquipmentLogByUserId(Integer userId);

    /**
     * 批量删除设备日志
     * 
     * @param userIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTEquipmentLogByUserIds( Integer[] userIds);



    int addIndex();

    List<SysUser> getUserListByDeptId(SysUser sysUser);
    //根据时间userId 判断是否有未归还的设备
    Integer selectTEquipmentLogByTime(@Param("userId") Long userId,@Param("newTime") Date newTime,@Param("oldTime") Date oldTime);


    int selectTEquipmentLogDeptByTime(TEquipmentLog tEquipmentLog);
}
